//
//  Movie.m
//  ShowTimeApp
//
//  Created by Ruby on 11/7/11.
//  Copyright (c) 2011 __MyCompanyName__. All rights reserved.
//

#import "Movie.h"
#import "ShowTime.h"


@implementation Movie
@dynamic TrailerUrl;
@dynamic Director;
@dynamic TitleVI;
@dynamic Actors;
@dynamic Length;
@dynamic StartedDate;
@dynamic Language;
@dynamic EndedDate;
@dynamic TitleEN;
@dynamic Writer;
@dynamic Country;
@dynamic Description;
@dynamic ID;
@dynamic Rating;
@dynamic Discount;
@dynamic Genre;
@dynamic MovieStudio;
@dynamic Version;
@dynamic ImageUrl;
@dynamic Movie_ShowTime;

- (void)addMovie_ShowTimeObject:(ShowTime *)value {    
    NSSet *changedObjects = [[NSSet alloc] initWithObjects:&value count:1];
    [self willChangeValueForKey:@"Movie_ShowTime" withSetMutation:NSKeyValueUnionSetMutation usingObjects:changedObjects];
    [[self primitiveValueForKey:@"Movie_ShowTime"] addObject:value];
    [self didChangeValueForKey:@"Movie_ShowTime" withSetMutation:NSKeyValueUnionSetMutation usingObjects:changedObjects];
    [changedObjects release];
}

- (void)removeMovie_ShowTimeObject:(ShowTime *)value {
    NSSet *changedObjects = [[NSSet alloc] initWithObjects:&value count:1];
    [self willChangeValueForKey:@"Movie_ShowTime" withSetMutation:NSKeyValueMinusSetMutation usingObjects:changedObjects];
    [[self primitiveValueForKey:@"Movie_ShowTime"] removeObject:value];
    [self didChangeValueForKey:@"Movie_ShowTime" withSetMutation:NSKeyValueMinusSetMutation usingObjects:changedObjects];
    [changedObjects release];
}

- (void)addMovie_ShowTime:(NSSet *)value {    
    [self willChangeValueForKey:@"Movie_ShowTime" withSetMutation:NSKeyValueUnionSetMutation usingObjects:value];
    [[self primitiveValueForKey:@"Movie_ShowTime"] unionSet:value];
    [self didChangeValueForKey:@"Movie_ShowTime" withSetMutation:NSKeyValueUnionSetMutation usingObjects:value];
}

- (void)removeMovie_ShowTime:(NSSet *)value {
    [self willChangeValueForKey:@"Movie_ShowTime" withSetMutation:NSKeyValueMinusSetMutation usingObjects:value];
    [[self primitiveValueForKey:@"Movie_ShowTime"] minusSet:value];
    [self didChangeValueForKey:@"Movie_ShowTime" withSetMutation:NSKeyValueMinusSetMutation usingObjects:value];
}


@end
